

function addformbuttonlink()
{

   
    $("#addform").append('<div id="feature'+rowdiv+'" class="itPlg addBtnPlug featureclass">'+dataform['buttonlink']+"</div>");
    var rownow=rowdiv;

   
   
   
   $('#feature'+rownow+' .deleterowbutton').click(function(){
   
    $('#feature'+rownow).remove();
    
   });
  
  
    
    
    
    
    rowdiv++;

}
function saveformbuttonlink(id,plugid)
{
   var obj={};
   obj={plugid:plugid,name:$("#"+id+' input[name="btnname[]"]').val(),url:$("#"+id+' input[name="btnlink[]"]').val()};
   
   return obj;


}
function getformbuttonlink(dataplugin)
{
if(dataplugin.url)
{
var code = '<div class="ldIt wrpBtnLd clBg4">\n';
code += '<div class="wrpBooking">\n';
code += '<div class="booking clBgSp2">\n';
code += '<a href="'+dataplugin.url+'">\n';
if(dataplugin.name)
{
code += '<span class="clTxtW fs11">'+dataplugin.name+'</span>\n';
}else
{
code += '<span class="clTxtW fs11">Button</span>\n';
}
code += '</a>\n';
code += '</div>\n';
code += '</div>\n';
code += '</div>';
}else
{
var code="";

}
return code;


}
 function editformbuttonlink(datarow)
 {
   addformbuttonlink();
    var rownow= rowdiv-1;
     $('#feature'+rownow+'  input[name="btnlink[]"]').val(datarow.url);
     $('#feature'+rownow+'  input[name="btnname[]"]').val(datarow.name);
  
 }